<template>
    <van-address-list v-model="chosenAddressId" :list="list" :disabled-list="disabledList" default-tag-text="默认"
        @add="onAdd" @edit="onEdit"  add-button-text='去支付' @click="onsubmit"/>
    <van-cell-group>
        <van-cell title="用户" :value="orderdetailData.username" />
        <van-cell title="订单号" :value="orderdetailData.orderId" />
        <van-cell title="描述" :value="orderdetailData.product_code" />
    </van-cell-group>
</template>

<script setup>
import { ref } from 'vue'
import { useRoute } from 'vue-router'
const route = useRoute()
console.log(route.params.orderId)
import { orderdetailApi } from '@/api/api'
let orderdetailData = ref([])
orderdetailApi(route.params.orderId).then(res => {
    console.log('订单详情', res)
    orderdetailData.value = res.data.data;
    paydata.value = {
        orderId:res.data.data.orderId,
        subject:res.data.data.product_code,
        totalPrice:res.data.data.totalPrice / 100
    }
})
const list = [
    {
        id: '1',
        name: '张三',
        tel: '13000000000',
        address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
        isDefault: true,
    },
]
</script>

<style lang="scss" scoped></style>